package com.liuzhengting.template.rest;

import com.liuzhengting.common.model.GeneralResult;
import com.liuzhengting.template.model.po.Round;
import com.liuzhengting.template.service.RoundService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/")
public class RoundRest {
	
	@Autowired
	private RoundService roundService;
	
	/**
	 * 首页
	 * @return
	 */
	@GetMapping("/")
	public GeneralResult roundHome(){
		return roundService.findHome();
	}
	
	/**
	 * 首页查询
	 * @param wokey
	 * @return
	 */
	@GetMapping("/homequery")
	public GeneralResult roundContext(@RequestBody String wokey,
	                                  @RequestBody String keyvalue){
		return roundService.homequery(wokey,keyvalue);
	}

}
